<template>
  <div>
    <ArticleItem v-for="item in articleList" :key="item.art_id" :item='item' @del='delFn' @del2='del2Fn'></ArticleItem>
  </div>
</template>

<script>
import ArticleItem from '@/components/ArticleItem.vue'
import { myNotify } from '../../utils/Notify'
export default {
  props: {
    articleList: {
      type: Array,
      default () {
        return []
      }
    }
  },
  methods: {
    delFn (item) {
      this.$emit('del', item)
      myNotify({ type: 'success', message: '反馈成功' })
    },
    del2Fn (item, action) {
      this.$emit('del2', item, action)
      myNotify({ type: 'success', message: '反馈成功' })
    }
  },
  components: {
    ArticleItem
  }
}
</script>

<style>

</style>
